﻿USE [sms]
GO
/****** Object:  Table [dbo].[SMSPay]    Script Date: 02/10/2012 02:12:58 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
create TABLE [dbo].[SMSPay](
	[ID] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
	[SMS_Id] [bigint] NOT NULL,
	[GetTime] [datetime] NOT NULL CONSTRAINT [DF_SMSPay_GetTime]  DEFAULT (getdate()),
	[Phone] [dbo].[dtPhoneNumber] NULL,
	[PhoneSub] [tinyint] NULL,
	[MainPhone] [dbo].[dtPhoneNumber] NULL,
	[CorpPhone1] [dbo].[dtPhoneNumber] NULL,
	[CorpPhone2] [dbo].[dtPhoneNumber] NULL,
	[TagPhone] [dbo].[dtPhoneNumber] NULL,
	[TagPhoneSub] [tinyint] NULL,
	[CmdCode] [dbo].[dtCmdCode] NULL,
	[OperationId] [int] NULL,
	[AnswerPhone] [dbo].[dtPhoneNumber] NULL,
	[Status] [tinyint] NULL,
	[RepeatLimit] [tinyint] NULL,
	[RepeatCount] [tinyint] NULL,
	[TimeLimit] [smallint] NULL,
	[Confirmation_Id] [bigint] NULL,
	[Service] [char](3) COLLATE Cyrillic_General_CI_AS NULL,
	[SentToServiceTime] [datetime] NULL,
	[ResultServiceTime] [datetime] NULL,
	[ServiceResultText] [dbo].[dtMessage] NULL,
	[ServiceResultCode] [smallint] NULL,
	[FullSum2] [money] NULL,
	[TransferSum2] [money] NULL,
	[Account] [dbo].[dtAccount] NULL,
	[AccountSum2] [money] NULL,
	[Misc] [varchar](1024) COLLATE Cyrillic_General_CI_AS NULL,
	[Comment] [varchar](512) COLLATE Cyrillic_General_CI_AS NULL,
	[ResultCode] [smallint] NULL,
	[AnswerNeeded] [bit] NULL,
	[ProTime] [datetime] NULL,
 CONSTRAINT [PK_SMSPay] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF